package com.zxy.ziems.server.energy.util;

import cn.hutool.core.date.LocalDateTimeUtil;

/**
 * @author 10348359
 * @create 2024-04-03 9:56
 */
public class EnergyUtil {

    /**
     * 根据年份获取能源历史表名
     * @param year
     * @return
     */
    static public String getEnergyHistoryTableName(Integer year) {

        return "t_device_measure_data_history_" + year;
    }

    /**
     * 获取当前时间的能源历史表名
     * @return
     */
    static public String getCurrentYearEnergyHistoryTableName() {
        int year = LocalDateTimeUtil.now().getYear();
        return "t_device_measure_data_history_" + year;
    }
}
